home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / ConfigLib2.lha / ConfigLibrary / ConfigLib2.readme
Encoding:
Text File  |  1996-09-07  |  1.9 KB  |  45 lines

  1. Short: Config.library: Easy access to cfg files
  2. Author: Adam Dawes (Adam@Beachyhd.demon.co.uk)
  3. Uploader: Adam Dawes (Adam@Beachyhd.demon.co.uk)
  4. Type: dev/misc
  5.  
  6.  
  7. This archive contains config.library, a system to make accessing config
  8. files particularly easy, and all necessary documentation, includes, etc. to
  9. use the library with C and assembly language.
  10.  
  11. This is a revision of my Config system, previously available as sourcecode
  12. in dev/c/Config101.lha. Config.library is completely compatible with the
  13. Config system; existing config files will still work, and the function
  14. names are identical.
  15.  
  16. If anyone is interested in converting the includes and examples to work in
  17. any other languages (Amiga E, BASIC, etc.) then please contact me.
  18.  
  19.  
  20.  
  21. Introduction
  22. ~~~~~~~~~~~~
  23.  
  24. Well, I hate Windows as much as the next man, but occasionally I stumble
  25. across a good idea hidden away within the operating system.
  26.  
  27. There are a couple of functions buried in there for reading and writing
  28. configuration files, and they actually make things very easy. I decided I'd
  29. had enough of messing around with config files on my Amiga, so I've ported
  30. the functions to Amiga C.
  31.  
  32. The idea is that the configuration files take a definitive structure which
  33. the Config functions can understand. Each config file is split in to a
  34. number of "Sections" (which are stored in the config file as a keyword
  35. inside square brackets). In each of these sections are a number of "Items",
  36. each of which contains an actual data item. The items are local to the
  37. section that contains them, so it's perfectly legal to use one item name in
  38. several sections, they'll all be treated separately.
  39.  
  40. The beauty behind the functions is you don't have to worry about creating
  41. files or scanning through them. Even when it comes to reading data, you
  42. don't have to care if the config file exists or not as you provide a
  43. default value to use if the file/section/item cannot be located.
  44. Everything is automated within the Config functions.
  45.